Skip to content

Instantly share code, notes, and snippets.

@xthezealot
xthezealot / lyra.txt
Last active October 21, 2026 02:51
Lyra - AI Prompt Optimization Specialist
You are Lyra, a master-level AI prompt optimization specialist. Your mission: transform any user input into
precision-crafted prompts that unlock AI's full potential across all platforms.
## THE 4-D METHODOLOGY
### 1. DECONSTRUCT
- Extract core intent, key entities, and context
- Identify output requirements and constraints
- Map what's provided vs. what's missing
@silascutler
silascutler / gist:c7f04537a79ace89569f979d964af0f9
Last active October 21, 2026 02:45
PHP2Shell Censys Query (CVE-2026-109618 / CVE-2026-109619 )
host.services.software.product: "MediaWiki" or host.services.software.product: "Wordpress" or host.services.software.product: "phpBB" or host.services.software.product: "Magento" or host.services.software.product: "Laravel" or host.services.software.product: "Drupal" or host.services.software.product: "Symphony" or host.services.software.product = "whm"
@FeepingCreature
FeepingCreature / youre_doing_json_apis_wrong.md
Last active December 25, 2025 12:06
You Are Doing JSON APIs Wrong

You are doing JSON APIs wrong.

When you use JSON to call an API - not a REST API, but something like JSON-RPC - you will usually want to encode one of several possible messages.

Your request body looks like this:

{
 "type": "MessageWithA",
@jboner
jboner / latency.txt
Last active October 21, 2026 02:39
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@kinseytamsin
kinseytamsin / attribution-backup.ps1
Created May 12, 2025 17:15
PowerShell script to backup and restore JOSM Bing attribution file
Param([Parameter(Mandatory=$true, Position=0)][string]$Mode, [switch]$DryRun)
$modes = "backup", "restore"
if (!($Mode -in $modes)) {
Write-Error "Invalid mode: $Mode. Valid modes are `"backup`" and `"restore`"."
exit 1
}
$josmCachePath = "${env:LOCALAPPDATA}\JOSM\cache"
$bingFilename = "bing.attribution.xml"
@danydev
danydev / zsh_history.sh
Created May 21, 2020 09:01
Store commands in history only if successful
# README: This allows you to store in your history file only commands
# with a successful status (or forced exited by you with signal 2).
# Put this content in your .zhsrc
# CREDITS: inspired by https://scarff.id.au/blog/2019/zsh-history-conditional-on-command-success/
# This function will be hooked to zshaddhistory.
# zshaddhistory is called before a history line is saved. See zshmisc(1).
function my_zshaddhistory() {
# Prevent the command from being written to history before it's
# executed; save it to LASTHIST instead. Write it to history
@ShipkaChalk
ShipkaChalk / gist:629fdc42dad781776d2007fc502188f3
Last active October 21, 2026 02:30
Plex Hetzner workaround using Docker.

Hey, here is how you can route all plex traffic via wireguard out of another VPS, this can be used for any container but was inspired by the recent Hetzner block Plex put in place.

And no not all of us are using it for nefarious means, sometimes people don't have room for a home server.

Why docker? I prefer it as it keeps items separated and cleaned. It also allows for quickly moving configurations around from server to server if need be.

  1. Get yourself a VPS. ( If your VPS has a built in firewall like IONOS (but don't use Ionos), then you need to allow through the ports specified in the VPS docker compose)
  2. Install docker ( Do not use snap, follow their offical directions otherwise you may have docker related issues. )
  3. Create this docker-compose.yml
@idbrii
idbrii / botw-cedec2017.md
Last active October 21, 2026 02:28
An inline image version of Matt Walker's translation of CEDEC 2017 talks by Nintendo
@TitleOS
TitleOS / MPL2.0CC.license
Created February 17, 2026 00:28
Modification of the Mozilla Public License 2.0 with a Commons Clause that prevents commercial profits or selling.
Mozilla Public License Version 2.0
==================================
This software is licensed under the Mozilla Public License Version 2.0 ("MPL 2.0"), subject to the condition set forth below (the "Commons Clause").
The following condition applies to the software ("Software"):
The Software is made available to you subject to the terms of the MPL 2.0, subject to the following condition:
COMMONS CLAUSE